<%@ include file="/WEB-INF/jsp/includes/include.jsp" %>
<%@ page import="org.springframework.security.ui.webapp.AuthenticationProcessingFilter" %>
<%@ page import="org.springframework.security.ui.AbstractProcessingFilter" %>
<%@ page import="org.springframework.security.AuthenticationException" %>
<%@ include file="/WEB-INF/jsp/includes/header.jsp" %>
<h2>Login</h2>
<c:if test="${not empty param.login_error}">
<p class="error">The username or password you entered is incorrect.</p>
</c:if>
<p>Don't have an <a href="<c:url value="/user/add/"/>">account</a> yet? Join us now, it's free and takes just a minute.</p>
<c:url var="actionUrl" value="/j_spring_security_check" />
<form action="${actionUrl}">
	<fieldset class="row1">
		<div class="form-pair">
			<div class="form-item">
				<label for="title">Username:</label>
			</div>
			<div class="form-value">
				<input type="text" name="j_username" id="j_username" <c:if test="${not empty param.login_error}">value='<%= session.getAttribute(AuthenticationProcessingFilter.SPRING_SECURITY_LAST_USERNAME_KEY) %>'</c:if>/>
			</div>
		</div>
		<div class="form-pair">	
			<div class="form-item">
				<label for="description">Password:</label>
			</div>
			<div class="form-value">
 				<input type="password" name="j_password" id="j_password"/>
 				<br /><small><a href="<c:url value="/user/forgot-password.html"/>">Forgotten Password</a></small>
 			</div>
		</div>
		<!-- 
		<div class="form-pair">	
			<div class="form-value">
 				<input type='checkbox' name='_spring_security_remember_me'/> Remember me on this computer.
 			</div>
		</div>
		 -->		
	</fieldset>
	<fieldset class="form-submit">
		<div class="form-submit-buttons">
			<input type="submit" class="input-submit" name="submit" value="Login" />
		</div>
	</fieldset>
</form>
<%@ include file="/WEB-INF/jsp/includes/footer.jsp" %>